ExamPlay Light Logo
Oturum aç

Computer Science for IGCSE & O level - Programming (Section 16 - No. 13)

What would be the outcome if the `answer` variable is given the value "*" in a case statement where cases are defined for '+', '-', '*' and '/', but no default case is available?
The code block corresponding to the '*' case would be executed.
The code block for the '+' case would be executed.
No code block would be executed.
The program would exit with an error.

Açıklama

The program will search for a match. Because the '*' is a value in the cases, the code block will execute.

Yorumlar (0)

Yorum yapmak için giriş yapın
Reklamcılık
BrainBehindX Inc Logo
©2026; Tarafından desteklenmektedir BrainBehindX Inc